package com.alphas.xixibackendalphas.service;

import com.alphas.xixibackendalphas.model.domain.User;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author Alphas
* @description 针对表【user】的数据库操作Service
* @createDate 2024-06-12 15:11:19
*/
public interface UserService extends IService<User> {
    Long userRegister(String userAccount, String userPassword, String checkPassword);
    User userLogin(String userAccount, String userPassword , HttpServletRequest request);
    User getSafetyUser(User originUser);

    List<User> userSearch(HttpServletRequest request, String username);

    Boolean deleteUser(HttpServletRequest request, long userId);

    User getCurrentUserInfo(HttpServletRequest request);

    Integer userLogout(HttpServletRequest request);
    List<User> searchUserByTags(List<String> tagNameList);

    Integer updateUser(User user, HttpServletRequest request);

    Page<User> userRecommend(HttpServletRequest request, int pageSize, int pageNum);
    User getUserLogin(HttpServletRequest request);

    boolean isAdmin(User loginUser);
    boolean isAdmin(HttpServletRequest request);

    List<User> matchUsers(long num, User user);
}
